﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_Default : System.Web.UI.Page
{
    public override string StyleSheetTheme
    {
        get
        {
            //return base.StyleSheetTheme;
            return ConfigGlobal.GetGlobal().Theme;
        }
        set
        {
            base.StyleSheetTheme = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        this.Label1.Visible = false;
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            ConfigGlobal.CheckLogin(this.TextBox1.Text, this.TextBox2.Text);
            Response.Redirect("main.htm");
        }
        catch (NoUserException ex1)
        {
            //Response.Write(ex1.Message);
            this.Label1.Text = ex1.Message;
            this.Label1.Visible = true;
        }
        catch (WrongPasswordException ex2)
        {
            //Response.Write(ex2.Message);
            this.Label1.Text = ex2.Message;
            this.Label1.Visible = true;
        }
    }
}
